home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
program
/
ixemlsrc.lha
/
ixemul
/
libsrc
/
__panic.c
next >
Wrap
C/C++ Source or Header
|
1995-12-23
|
1KB
|
50 lines
/*
* This once was req.c by Markus Wandel. It doesn't look too much like the
* original version though... Well, it was PD, I used it, so here is his
* original disclaimer:
*
* req.c - by Markus Wandel - 1990
* Placed in the public domain 7 Oct 1990
* Please have the courtesy to give credit if you use this code
* in any program.
*
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#include <proto/intuition.h>
#include <proto/exec.h>
#define SysBase *(void **)4
int __request_msg (const char *msg, const char *button)
{
struct IntuiText line, righttext;
struct IntuitionBase *IntuitionBase;
int result;
/* we (re)open intuition, because that way we don't depend on arp.library
* being available for us to open intuibase */
if ((IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0)))
{
line.FrontPen = AUTOFRONTPEN;
line.BackPen = AUTOBACKPEN;
line.DrawMode = AUTODRAWMODE;
line.ITextFont = AUTOITEXTFONT;
line.NextText = 0;
CopyMem(&line, &righttext, sizeof(line));
righttext.LeftEdge = AUTOLEFTEDGE;
righttext.TopEdge = AUTOTOPEDGE;
line.LeftEdge = 15;
line.TopEdge = 5;
line.IText = (UBYTE *) msg;
righttext.IText = (UBYTE *) button;
result = AutoRequest(0L, &line, 0L, &righttext, 0L, 0L, 320L, 72L);
CloseLibrary((struct Library *)IntuitionBase);
return result;
}
return -1;
}